/**************************************************************************
File:        frontpanel.cpp
Description:

Copyright:   (C) 2012 by ZJ Laczik
Email:       Laczik@eng.ox.ac.uk
****************************************************************************
Change log:
   begin      15/2/2012
***************************************************************************/

#include <QString>

#include "frontpanel.h"

FrontPanel::FrontPanel(QWidget *parent)
        : QWidget(parent)
{
    setupUi(this);
}

void FrontPanel::slotDspMsg(const QString & msg, bool f)
{
    statusDisplay->appendPlainText(msg);
}

void FrontPanel::slotDspPos(float x, float y, float z)
{
    xPosLCD->display( QString("%1") .arg(x,0,'f',1) );
    yPosLCD->display( QString("%1") .arg(y,0,'f',1) );
    zPosLCD->display( QString("%1") .arg(z,0,'f',1) );
    mPosDsp->SetPos(x,y,z);
}

void FrontPanel::slotDisableControls(bool f)
{
    burst->setEnabled(~f);
    singleShot->setEnabled(~f);
    continuous->setEnabled(~f);
    startBatch->setEnabled(~f);
    stop->setEnabled(f);
}
